# src/timeseries/data_feed/CMakeLists.txt
cmake_minimum_required(VERSION 3.20) # 需要 CMake 3.14 或更高版本
project(test_quill)

# 定义项目公共头文件目录
set(LOCAL_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)

add_executable(test_quill  test_quill.cpp )

# 设置包含目录（使用接口包含保证使用者可见）
target_include_directories(test_quill
    PUBLIC
    $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>               # 项目include
    $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>               # 项目公共头文件
    $<INSTALL_INTERFACE:include>                            # 安装后路径

)

target_link_directories( test_quill PUBLIC ${PROJECT_LIB_DIR} )
# 添加编译选项，确保在编译和链接时使用正确的宏定义
target_compile_options(test_quill PRIVATE -DQUILL_FMT_EXTERNAL=ON)
target_link_libraries(test_quill  quill fmt )


add_executable(test_yaml  test_yaml.cpp)

# 设置包含目录（使用接口包含保证使用者可见）
target_include_directories(test_yaml
    PUBLIC
    $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>               # 项目include
    $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>               # 项目公共头文件
    $<INSTALL_INTERFACE:include>                            # 安装后路径

)

target_link_directories( test_yaml PUBLIC ${PROJECT_LIB_DIR} )
target_link_libraries(test_yaml  yaml-cpp )


add_executable(test_fmt  test_fmt.cpp)

# 设置包含目录（使用接口包含保证使用者可见）
target_include_directories(test_fmt
    PUBLIC
    $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>               # 项目include
    $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>               # 项目公共头文件
    $<INSTALL_INTERFACE:include>                            # 安装后路径
)

target_link_directories( test_fmt PUBLIC ${PROJECT_LIB_DIR} )
target_link_libraries(test_fmt  fmt )